import React,{Component} from 'react';
import Adaptive from '../component/adaptive/Adaptive';
import asyncComponent from '../../Bundle';//动态加载组件，用作代码分割
import Header from '../system/header/Header';
import Lang from './List.json';
import Source from './source/Source';
import queryString from 'query-string';
import './advisory.less';
//pc
const List = asyncComponent(() => import('../system/list/List'));
const Footer = asyncComponent(() => import('../component/footer/Footer'));
//mobile
const FooterMobile = asyncComponent(() => import('../component/footer-mobile/FooterMobile'));
const prefix = 'advisory';
class Advisory extends Component{
    render(){
        let page = queryString.parse(this.props.location.search).page;
        return(
            <div className={prefix}>
                <Header refName="health" childNodes="health-a" imgUrl={require('./img/advisory.jpg')} mobileImg={require('../component/mobileBanner/banner1.jpg')}/>
                <Adaptive desktop={<List list={Lang} Source={Source} listPosition="left"/>} phone={Source[page?page:0]} size={1200}/>
                <Adaptive desktop={<Footer/>} phone={<FooterMobile/>} size={1200}/>
            </div>
        )
    }
}
export default Advisory;